﻿
<%@ page import="com.claims.Clinic" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="main" />
        <title>Create Clinic</title>         
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${resource(dir:'')}"><g:message code="menu.home" /></a></span>
            <span class="menuButton"><g:link class="list" action="list">Clinic List</g:link></span>
        </div>
        <div class="body">
            <h1>Create Clinic</h1>
						<jdsb:message />
            <g:hasErrors bean="${clinicInstance}">
            <div class="errors">
                <g:renderErrors bean="${clinicInstance}" as="list" />
            </div>
            </g:hasErrors>
            <g:form action="save" method="post" >
                <div class="dialog">
                    <table>
                        <tbody>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="name">Name:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:clinicInstance,field:'name','errors')}">
                                    <input type="text" id="name" name="name" value="${fieldValue(bean:clinicInstance,field:'name')}"/>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="address">Address:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:clinicInstance,field:'address','errors')}">
                                    <input type="text" id="address" name="address" value="${fieldValue(bean:clinicInstance,field:'address')}"/>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="address2">Address2:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:clinicInstance,field:'address2','errors')}">
                                    <input type="text" id="address2" name="address2" value="${fieldValue(bean:clinicInstance,field:'address2')}"/>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="city">City:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:clinicInstance,field:'city','errors')}">
                                    <input type="text" id="city" name="city" value="${fieldValue(bean:clinicInstance,field:'city')}"/>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="postcode">Postcode:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:clinicInstance,field:'postcode','errors')}">
                                    <input type="text" id="postcode" name="postcode" value="${fieldValue(bean:clinicInstance,field:'postcode')}"/>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="state">State:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:clinicInstance,field:'state','errors')}">
                                    <g:select optionKey="id" from="${com.claims.code.State.list()}" name="state.id" value="${clinicInstance?.state?.id}" ></g:select>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="banned">Banned:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:clinicInstance,field:'banned','errors')}">
                                    <g:checkBox name="banned" value="${clinicInstance?.banned}" ></g:checkBox>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="panel">Panel:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:clinicInstance,field:'panel','errors')}">
                                    <g:checkBox name="panel" value="${clinicInstance?.panel}" ></g:checkBox>
                                </td>
                            </tr> 
                        
                        </tbody>
                    </table>
                </div>
                <div class="buttons">
                    <span class="button"><input class="save" type="submit" value="Create" /></span>
                </div>
            </g:form>
        </div>
    </body>
</html>
